package com.dg.cuckoo.admin.service.impl;

import com.dg.cuckoo.admin.dto.basicInformation.label.OneLabelDto;
import com.dg.cuckoo.admin.repository.OneLabelRepository;
import com.dg.cuckoo.admin.service.HomeLabelService;
import com.dg.cuckoo.common.utils.PageModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeLabelServiceimpl implements HomeLabelService {

    @Autowired
    private OneLabelRepository repository;

    @Override
    public PageModel page(Integer page, Integer pageSize) {
        Integer one = page;
        page = (page - 1) * pageSize;
        List<OneLabelDto> list = repository.homePage(page, pageSize);
        int size = list.size();
        return new PageModel(one,pageSize,size,list);
    }

    @Override
    public void save(Integer number, String oneLabel, String twoLabel) {

    }
}
